package com.ruoyi.project.setsystem.companydept.mapper;

import com.ruoyi.project.setsystem.companydept.domain.CompanyDept;
import com.ruoyi.project.system.dept.domain.Dept;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author 大帅比
 * @date 2020-09-19 14:07
 * @desc 百战程序员 http://www.itbaizhan.com
 */
public interface CompanyDeptMapper {
    List<CompanyDept> All(CompanyDept companyDept);
    int selectDeptCount(CompanyDept companyDept);

    int checkDeptExistUser(Long deptId);
    int deleteDeptById(Long deptId);


    int insertDept(CompanyDept companyDept);


    int updateDept(CompanyDept companyDept);


    int updateDeptChildren(@Param("depts") List<CompanyDept> depts);

    CompanyDept selectDeptById(Long deptId);

    CompanyDept checkDeptNameUnique(@Param("deptName") String deptName, @Param("parentId") Long parentId);


    List<String> selectRoleDeptTree(Long roleId);


    void updateDeptStatus(CompanyDept companyDept);


    List<CompanyDept> selectChildrenDeptById(Long deptId);
}
